package com.java.tutorials.spring.aop;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

/**
 * Created by xuzhike on 2016/1/29.
 * http://www.java2s.com/Code/Java/Spring/SpringTracingAspect.htm
 */
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations={"classpath*:spring-aop.xml"})
public class TracingAspectMain {
    @Autowired
    public ApplicationContext ctx;
    @Test
    public void test(){
        IBusinessLogic testObject = (IBusinessLogic) ctx.getBean("businesslogicbean");

        testObject.foo();
    }
}
